#!/usr/bin/python3
# -*- coding: utf8 -*-
# Date   : 2021/02/12
# Author : Kwan
# Email  : allenxian@live.com
# Blog   : https://my.oschina.net/u/4173440

from flask import Blueprint, render_template, redirect, url_for
from flask_login import login_required
from flasky.common import manager_required


# 车辆通过记录
record = Blueprint(name='record', import_name='flasky', url_prefix='/record', template_folder='views/templates')


@record.route('/')
@login_required
def default():
    """
    通过记录
    """
    return redirect(url_for('record.parking'))


@record.route('/parking')
@login_required
def parking():
    """
    在场车辆
    """
    return render_template('record/default.html')


@record.route('/entrance')
@login_required
def entrance():
    """
    入场记录
    """
    return render_template('record/default.html')


@record.route('/exit')
@login_required
def exit():
    """
    离场记录
    """
    return render_template('record/default.html')


@record.route('/across')
@login_required
def across():
    """
    通过记录
    """
    return render_template('record/default.html')


@record.route('/recovery')
@login_required
@manager_required
def recovery():
    """
    通过记录
    """
    return render_template('record/default.html')